Carbon


GetCollectionItemInfo

Header: Collections.h Carbon status: Supported

Obtains information about a specific collection item given the item’s collection tag and collection ID.

OSErr GetCollectionItemInfo (
    Collection c, 
    CollectionTag tag, 
    SInt32 id, 
    SInt32 *index, 
    SInt32 *itemSize, 
    SInt32 *attributes
);
c

A reference to the collection object containing the item you want to obtain information about. The behavior of this function is undefined if you do not provide a reference to a valid collection object.

tag

The collection tag associated with the item you want to obtain information about.

id

The collection ID associated with the item you want to obtain information about.

index

On return, this value represents the collection index of the specified item. You may specify the constant dontWantIndex for this parameter if you do not want to determine the specified item’s collection index.

itemSize

On return, this value indicates the size in bytes of the variable-length data associated with the specified item. You may specify the constant dontWantSize for this parameter to indicate that you do not want to determine the size of this data.

attributes

On return, this value contains a copy of the attributes associated with the specified item. You may specify the constant dontWantAttributes for this parameter if you do not want a copy of the item’s attributes.

function result

A result code.

DISCUSSION

This function returns information in the index, itemSize, and attributes parameters:

To obtain information about a collection item using the collection index to specify the item, use the GetIndexedCollectionItemInfo function.

To obtain information about a collection item using the tag and whichItem parameters to specify the item, use the GetTaggedCollectionItemInfo function.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)